﻿namespace LinkedTU.Models
{
    using System;
    using System.ComponentModel.DataAnnotations;
    using LinkedTU.Common.Constants;
    using LinkedTU.Common.Interfaces;
    using System.ComponentModel.DataAnnotations.Schema;

    public class City : IClassificator
    {
        public int CityId { get; set; }

        [MinLength(ValidationConstants.MinCityNameLength)]
        [MaxLength(ValidationConstants.MaxCityNameLength)]
        public string DisplayName { get; set; }

        public int Order { get; set; }

        [ForeignKey("Country")]
        public int CountryId { get; set; }

        public virtual Country Country { get; set; }
    }
}
